<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!--
      <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"  href="../static/css/bootstrap.min.css" type="text/css">
   -->

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
          integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body>

<div class="container" style="max-width: 600px;margin-top: 50px">
    <div>
        <form action="/register" th:object="${userForm}" method="post" class="bg bg-light">
            <div class="form-group">
                <label for="usernameId">用户名</label>
                <input type="text" name="username" id="usernameId" class="form-control" th:field="*{username}">
                <p class=" text-danger" th:if="${#fields.hasErrors('username')}" th:errors="*{username}">用户名不能为空</p>
            </div>
            <div class="form-group">
                <label for="passwordId">密码</label>
                <input type="text" name="password" id="passwordId" class="form-control" th:field="*{password}">
                <p class=" text-danger" th:if="${#fields.hasErrors('password')}" th:errors="*{password}"></p>
            </div>
            <div class="form-group">
                <label for="confirmPasswordId">确认密码</label>
                <input type="text" name="confirmPassword" id="confirmPasswordId" class="form-control" th:field="*{confirmPassword}">
                <p class=" text-danger" th:if="${#fields.hasErrors('confirmPassword')}" th:errors="*{confirmPassword}"></p>
            </div>
            <div class="form-group">
                <label for="emailId">邮箱</label>
                <input type="text" name="email" id="emailId" class="form-control" th:field="*{email}">
                <p class=" text-danger" th:if="${#fields.hasErrors('email')}" th:errors="*{email}"></p>
            </div>
            <div class="form-group">
                <label for="phoneId">手机号</label>
                <input type="text" name="phone" id="phoneId" class="form-control" th:field="*{phone}">
                <p class=" text-danger" th:if="${#fields.hasErrors('phone')}" th:errors="*{phone}"></p>
            </div>
            <p class="text-center">
                <button class="btn btn-primary" type="submit">注册</button>
            </p>
        </form>
    </div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
        integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
        crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
        crossorigin="anonymous"></script>
<script th:src="@{/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js" type="text/javascript"></script>
</body>
</html>